<%@ page import="com.minxi.web.javabean.UserInfo" %>
<%@ page import="java.util.List" %>
<%@ page import="com.minxi.web.dao.impl.UserDaompl" %>
<%@ page import="javax.xml.xpath.XPath" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024-06-13
  Time: 09:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    table {
        border: 1px solid black;
    }

    table tr th {
        border: 1px solid black;
    }

    table tr td {
        border: 1px solid black;
    }
</style>
<body>
<%
    List<UserInfo> userList = (List<UserInfo>) request.getSession().getAttribute("userList");
    //out.print("数据库取出来用户信息列表"+userList)
    //String parameter = request.getParameter("userNme");
%>
<h1>新增成功</h1>
<a href=""> 新增用戶</a>
<table>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>手机号</th>
    </tr>
    <%for (UserDaompl userInfo : userList) {%>
    <tr>
        <td><%=userInfo.getId()%></td>
        <td><%=userInfo.getUserName() %></td>
        <td><%=userInfo.getUserAge() %></td>
        <%--三元運算符 1男 1男2女--%>
        <td><%=1 == userInfo.getUserSex() ? "男" : "女" %></td>
        <td><%=userInfo.getUserPhone() %></td>
        <td>
            <%-- <form action="" method="get">
                 <input type="submit">
                 <input type="text" name="id" value="1">
                 //删除 修改 查看详情
             </form>--%>
            <a href="<%=Path%>/del?id"><%=userInfo.getId()%>删除</a>
            <a href="<%=path%>/update.jsp?id=<%=userInfo.getId()%>">修改</a>
            <a href="<%=path%>/detail.jsp?id=<%=userInfo.getId()%>">查看详情</a>
        </td>
    </tr>
    <%}%>
</table>

</body>
</html>
